<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>业务部门列表</title>
<%@include file="/WEB-INF/jsp/public/commons.jspf"%>
</head>
<body>
 <!-- 面包屑导航 -->
 <ol class="breadcrumb">
  <li><a href="home_innerCentre.action">首页</a></li>
  <li class="active">轮播管理</li>
</ol>
  
<div class="container">
  <div class="row">
  	<!-- 轮播内容显示 -->
  	<div class="col-md-5">
     <s:iterator value="carouselList">
          <div class="media well well-lg ">
				<div class="media-left">
					<a href="#"><img src="${pageContext.request.contextPath }${picture }" class="img-rounded media-object" style="height: 140px;width: 230px;" alt=""></a>
				</div>
				<div class="media-body">
				    <p >${creatTime}</p>
				    <p >${news.title}</p>
					<a href="carousel_del.action?id=${id}" onclick="return confirmAct();"><p>删除</p></a>
				</div>
		  </div>
      </s:iterator>
      </div>
      <!-- 新闻列表显示 -->
      <div class="col-md-7">
      		<table class="table table-striped table-bordered">
			   <thead>
			      <tr class="success">
					<td>标题</td>
					<td>发布时间</td>
					<td>作者</td>
					<td>操作</td>
			      </tr>
			   </thead>
			   <tbody>
			   <s:iterator value="recordList">
					<tr>
						<td>${title}</td>
						<td>${postTime}</td>
						<td>${author}</td>
						<td> 
							<s:a action="carousel_addUI?newsid=%{id}">设为轮播</s:a>
						</td>
					</tr>   
			   </s:iterator>
			   </tbody>
			</table>
			<%--分页信息 --%>
			<%@include file="/WEB-INF/jsp/public/pageView.jspf"%>
			<form id="pageCondition" action="carousel_list.action"></form>
  	  </div>
	</div>
</div>
</body>
<script type="text/javascript">
           function confirmAct() 
{ 
  if(confirm('确定要删除吗?')) 
  { 
    return true; 
  } 
  return false; 
} 
  		$(function(){
  		
  		$('#carouselsubmit').click(function(){
  				$('#carouselForm').submit();
  	  		})
  		
  		});
  		$('#filepicture').fileinput({
	        'allowedFileExtensions': ['jpg', 'png', 'gif'],
	        overwriteInitial: false,
	        showUpload: false, //是否显示上传按钮
	        showCaption: true,//是否显示标题
	        maxFileSize: 20480,
	        minImageWidth: 50, //图片的最小宽度
	        minImageHeight: 50,//图片的最小高度
	        maxImageWidth: 100,//图片的最大宽度
	        maxImageHeight: 100,//图片的最大高度
	        browseClass: "btn btn-primary", //按钮样式             
	        previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
	   });
  </script>		
  		
 
</html>